The Flash Objects API > Flash objects overview > SWFFile.readFile()

 

SWFFile.readFile()

Description

Reads a Flash Object file.

Arguments

fileName

fileName is a path to a Flash Object file to read, expressed as a file://URL.

Returns

An array of strings. The first array element is the full path to the template .swt file. The following strings represent the parameters (name/value pairs) for the object. Each name is followed in the array by its value. The first name/value pair is "dwType" followed by its value; null is returned if the file cannot be found or if it is not a Flash Object file.

Example

Calling this:

var params = SWFFile.readFile("file:///MyMac/test.swf");

will return the following in the parameters array:

"file:///MyMac/test.swt"  // the template file used to create this .swf file
"dwType"                  // first parameter
"myType"                  // first parameter value
"text"                    // second parameter
"Hello World"             // second parameter value